package com.sunfeng.chap5.selectkey;

import java.io.IOException;
import java.nio.channels.Selector;

/**
 * 判断selector 是否打开
 */
public class Test18 {
    public static void main(String[] args) throws IOException {
        Selector selector = Selector.open();
        System.out.println(selector.isOpen());
        selector.close();
        System.out.println(selector.isOpen());
    }
}
